package cn.serenedream.housedecoration.serivce;

import cn.serenedream.housedecoration.dao.SaleProductsRepository;
import cn.serenedream.housedecoration.entity.SaleProducts;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SaleProductsService {
    @Autowired
    SaleProductsRepository saleProductsRepository;

    public void save(SaleProducts saleProducts) {
        saleProductsRepository.save(saleProducts);
    }

    public List<SaleProducts> findBySaleId(String id) {
        return saleProductsRepository.findBySaleId(id);
    }
}
